package com.example.brazil_project;




import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.example.brazil_project.function.LoginFunction;
import com.example.brazil_project.function.Public_method;
import com.example.brazil_project.parameter.Parameter;
import com.example.brazil_project.service.MsgService;
import com.example.brazil_project.util.DateUtil;
import com.example.brazil_project.util.FirstOpenUtil;
import com.example.brazil_project.util.SQLiteDatabaseUtil;
import com.example.brazil_project.util.SharedPreferencesUtil;
import com.example.brazil_project.util.ThreadUtil;
import com.example.brazil_project.util.WebviewSetting;









































import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Notification.Builder;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Environment;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.RemoteViews;

public class MainActivity extends Activity {
	 private ViewPager viewPager;  //对应的viewPager 
	  private List<View> viewList;//view数组 
	  WebView webview=null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);	
		
		
		webview = WebviewSetting.getWebview(this,"file:///android_asset/sign_in.html");
		FirstOpenUtil.intiAPP(this, webview);
		setContentView(webview);
		
		
		
			
//		webview.setWebViewClient(new WebViewClient() {
//			  @Override
//			  public void onPageFinished(WebView view, String url) {
//			      super.onPageFinished(view, url);
//			      //在这里执行你想调用的js函数
//			      webview.loadUrl("javascript:PageFinished()");
//			  }
//
//			});
		
	//	webview = WebviewSetting.getWebview(this,"javascript:openloading()");
		//http://pic.qiantucdn.com/58pic/15/28/09/04w58PICJDu_1024.jpg
//		ThreadUtil t =new ThreadUtil(this, "到空运", "到货啦赶紧查看","sendN",100,"assets/img/msg_xt.png",null );
//		Thread th = new Thread(t );
//		th.start();
	}

	@Override
	protected void onStart() {
		//webview = WebviewSetting.getWebview(this,"javascript:closeloading()");
		super.onStart();
	}
	
	@Override
	protected void onPause() {


		super.onPause();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			return true;
		}
		return super.onOptionsItemSelected(item);
	}
	
    
    
	
}
